<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>产品未激活！</title>
    <script th:src="@{/assets/js/core/jquery.min.js}"></script>
    <link th:href="@{/assets/css/sb-admin-2.min.css}" rel="stylesheet">

</head>

<body class="bg-gradient-primary">

<div class="container">

    <div class="card o-hidden border-0 shadow-lg my-5">
        <div class="card-body p-0">
            <!-- Nested Row within Card Body -->
            <div class="row">
                <div class="col-lg-5 d-none d-lg-block bg-register-image"></div>
                <div class="col-lg-7">
                    <div class="p-5">
                        <div class="text-center">
                            <h1 class="h4 text-gray-900 mb-4">产品未激活！</h1>
                        </div>
                        <form class="user" id="register">
                            <div class="form-group">
                                <input type="text" class="form-control form-control-user" id="machineCode" disabled
                                       name="machineCode" placeholder="禁止手动输入机器码" th:value="${machineCode}">
                            </div>
                            <div class="form-group">
                                <input type="text" class="form-control form-control-user" id="serverName"
                                       name="serverName" placeholder="请输入你的服名称" >
                            </div>
                            <font color="red"></font>
                            <input type="button" class="btn btn-primary btn-user btn-block" id="registsubmit"
                                   onClick="javascript:registActive();" value="请求激活"/>
                            <hr>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script th:replace="systemCommon/HarinCommon :: commonJs"></script>
<script type="text/javascript" th:inline="javascript">
    function registActive(){
        let serverName = $("#serverName").val();
        if(isEmpty(serverName)){
            alert("你的服名不允许为空！");
            return;
        }
        $.ajax({
            url:  "/active/requestActivation",
            type:"post",
            data:{},
            success:function(data){

            }
        })

    }
</script>
</body>
</html>